// Qt on Metro Stub
// Copyright (c) Andrew Knight
// This software is licensed under the MIT: http://www.opensource.org/licenses/MIT

// Based on code from http://code.msdn.microsoft.com/windowsapps/Direct2D-Basic-Animation-d0a5a4d1, original license:
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved
#pragma once

#include <wrl.h>
#include "QtClient.h"

ref class View
{
public:
    View();
    
    void Initialize(
        _In_ Windows::UI::Core::CoreWindow^ window,
        _In_ Windows::ApplicationModel::Core::CoreApplicationView^ applicationView
        );

    void OnLogicalDpiChanged(_In_ Platform::Object^ sender);

    void OnWindowSizeChanged(
        _In_ Windows::UI::Core::CoreWindow^ sender, 
        _In_ Windows::UI::Core::WindowSizeChangedEventArgs^ args
        );

    void Run();
	void Update();

private:
	QtClient^ m_renderer;
    Windows::UI::Core::CoreWindow^ m_window;
    Windows::ApplicationModel::Core::CoreApplicationView^ m_applicationView;
    float m_dpi;
};
